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"
(interactive)
(lyskom-start-of-command 'kom-start-anew)
(lyskom-completing-clear-cache)
(clear-all-caches)
(let ((old-me lyskom-pers-no))
(let ((old-me lyskom-pers-no)
(login-successful nil))
(unwind-protect
(progn
(if lyskom-first-time-around
......@@ -308,10 +308,12 @@ variable documentation for lyskom-server-feautres"
(or lyskom-is-new-user
(silent-read
(lyskom-get-string 'password)))))
(if lyskom-is-new-user
(blocking-do 'add-member
(server-info->conf-pres-conf lyskom-server-info)
lyskom-pers-no 100 1))
(progn
(if lyskom-is-new-user
(blocking-do 'add-member
(server-info->conf-pres-conf lyskom-server-info)
lyskom-pers-no 100 1))
(setq login-successful t))
(lyskom-insert-string 'wrong-password)
(setq lyskom-pers-no nil))
(setq lyskom-is-new-user nil))))
......@@ -342,7 +344,9 @@ variable documentation for lyskom-server-feautres"
(if lyskom-who-am-i (setq lyskom-session-no lyskom-who-am-i))))
;; 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)
(lyskom-end-of-command)))
;; 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