Commit b5de78fe authored by David Kågedal's avatar David Kågedal
Browse files

(kom-start-anew): Sätt inte om lyskom-pers-no om man avbröt under

lösenordsinmatningen.
parent 3100f5dc
...@@ -257,8 +257,8 @@ variable documentation for lyskom-server-feautres" ...@@ -257,8 +257,8 @@ variable documentation for lyskom-server-feautres"
(interactive) (interactive)
(lyskom-start-of-command 'kom-start-anew) (lyskom-start-of-command 'kom-start-anew)
(lyskom-completing-clear-cache) (lyskom-completing-clear-cache)
(clear-all-caches) (let ((old-me lyskom-pers-no)
(let ((old-me lyskom-pers-no)) (login-successful nil))
(unwind-protect (unwind-protect
(progn (progn
(if lyskom-first-time-around (if lyskom-first-time-around
...@@ -308,10 +308,12 @@ variable documentation for lyskom-server-feautres" ...@@ -308,10 +308,12 @@ variable documentation for lyskom-server-feautres"
(or lyskom-is-new-user (or lyskom-is-new-user
(silent-read (silent-read
(lyskom-get-string 'password))))) (lyskom-get-string 'password)))))
(if lyskom-is-new-user (progn
(blocking-do 'add-member (if lyskom-is-new-user
(server-info->conf-pres-conf lyskom-server-info) (blocking-do 'add-member
lyskom-pers-no 100 1)) (server-info->conf-pres-conf lyskom-server-info)
lyskom-pers-no 100 1))
(setq login-successful t))
(lyskom-insert-string 'wrong-password) (lyskom-insert-string 'wrong-password)
(setq lyskom-pers-no nil)) (setq lyskom-pers-no nil))
(setq lyskom-is-new-user nil)))) (setq lyskom-is-new-user nil))))
...@@ -342,7 +344,9 @@ variable documentation for lyskom-server-feautres" ...@@ -342,7 +344,9 @@ variable documentation for lyskom-server-feautres"
(if lyskom-who-am-i (setq lyskom-session-no lyskom-who-am-i)))) (if lyskom-who-am-i (setq lyskom-session-no lyskom-who-am-i))))
;; If something failed, make sure we are someone ;; If something failed, make sure we are someone
(if (null lyskom-pers-no) (setq lyskom-pers-no old-me)) (if login-successful
(clear-all-caches)
(setq lyskom-pers-no old-me))
(setq lyskom-is-new-user nil) (setq lyskom-is-new-user nil)
(lyskom-end-of-command))) (lyskom-end-of-command)))
;; Run the hook kom-login-hook. We don't want to hang the ;; Run the hook kom-login-hook. We don't want to hang the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment